import { RouteRecordRaw } from 'vue-router';
import Layout from '@/views/home/Layout.vue';

export const orderRoutes: RouteRecordRaw[] = [
  {
    path: '/order',
    component: Layout,
    redirect: '/order/list',
    meta: { title: '订单管理', icon: 'Document' },
    children: [
      {
        path: 'list',
        name: 'OrderList',
        component: () => import('@/views/order/OrderList.vue'),
        meta: { title: '订单列表', funcodeId: 'order:list' }
      },
      {
        path: 'create',
        name: 'OrderCreate',
        component: () => import('@/views/order/OrderCreate.vue'),
        meta: { title: '创建订单', funcodeId: 'order:create' }
      },
      {
        path: 'detail/:id',
        name: 'OrderDetail',
        component: () => import('@/views/order/OrderDetail.vue'),
        meta: {
          title: '订单详情',
          funcodeId: 'order:detail',
          activeMenu: '/order/list'
        }
      }
    ]
  }
];
